<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:oso="http://osoftware.com/facelets" template="/WEB-INF/templates/mainSearchLayout.xhtml">

	<ui:define name="title">
		<h:outputText value="#{resourceBundle['attentionTime.title']}" />
	</ui:define>

	<ui:define name="searchFields">
		<oso:selectOneMenu id="specialistFilter" label="#{resourceBundle['schedule.specialist']}" value="#{attentionTimeModel.filter.specialist}" converter="specialistConverter"
			items="#{attentionTimeModel.selectableSpecialists}" itemLabel="fullName">
		</oso:selectOneMenu>

		<oso:selectOneMenu id="patientFilter" label="#{resourceBundle['attentionTime.patient']}" value="#{attentionTimeModel.filter.patient}" converter="patientConverter"
			items="#{attentionTimeModel.selectablePatients}" itemLabel="fullName" />

		<oso:calendar id="startFilterDate" label="#{resourceBundle['attentionTime.startFilterDate']}" value="#{attentionTimeModel.filter.startFilterDate}" />

		<oso:calendar id="endFilterDate" label="#{resourceBundle['attentionTime.endFilterDate']}" value="#{attentionTimeModel.filter.endFilterDate}" />

		<oso:selectOneMenu id="statusFilter" label="#{resourceBundle['attentionTime.status']}" value="#{attentionTimeModel.filter.attentionTimeStatus}" converter="attentionTimeStatusConverter"
			items="#{attentionTimeModel.selectableAttentionTimeStatus}" itemLabel="name" />
	</ui:define>

	<ui:define name="listValues">
		<ui:param name="listModel" value="#{attentionTimeModel.list}" />
		<ui:param name="targetObject" value="#{attentionTimeModel.editedEntity}" />
	</ui:define>

	<ui:define name="searchColumns">
		<p:column sortBy="#{row.date}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['attentionTime.timeAndDate']}" />
			</f:facet>
			<h:outputText value="#{row.date}">
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" />
			</h:outputText>
		</p:column>
		<p:column sortBy="#{row.patient.fullName}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['attentionTime.patient']}" />
			</f:facet>
			<h:outputText value="#{row.patient.fullName}" />
		</p:column>
		<p:column sortBy="#{row.specialistFee.specialist.fullName}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['attentionTime.assignedSpecialist']}" />
			</f:facet>
			<h:outputText value="#{row.specialistFee.specialist.fullName}" />
		</p:column>
		<p:column sortBy="#{row.attentionTimeStatus.name}">
			<f:facet name="header">
				<h:outputText value="#{resourceBundle['attentionTime.status']}" />
			</f:facet>
			<h:outputText value="#{row.attentionTimeStatus.name}" />
		</p:column>
	</ui:define>
</ui:composition>